package com.groupbuying.customer.dao;

import com.groupbuying.customer.domain.CustomerAliinfoRelDO;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * 支付宝登录信息关联表
 * @author gaoruijun
 * @email 18511893135@163.com
 * @date 2019-07-23 11:45:51
 * @des
 */

@Mapper
@Repository
public interface CustomerAliinfoRelDao {

	CustomerAliinfoRelDO get(String customerId);
	
	List<CustomerAliinfoRelDO> list(Map<String, Object> map);
	
	int count(Map<String, Object> map);
	
	int save(CustomerAliinfoRelDO customerAliinfoRel);
	
	int update(CustomerAliinfoRelDO customerAliinfoRel);

	int updateByAliUserId(CustomerAliinfoRelDO customerAliinfoRel);

	int remove(String customer_id);
	
	int batchRemove(String[] customerIds);

	/**
	 * 根据customerId获取aliuserId
	 * @param customerId
	 * @return
	 */
	String getAliUserIdByCustomerId(String customerId);

	/**
	 * 根据aliPayUserId获取aliPayUserId
	 * @param aliPayUserId
	 * @return
	 */

	CustomerAliinfoRelDO getAliByalipayuserId(String aliPayUserId);
}
